<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>3D转换</title>
  <style>
    body{perspective: 500px; }
    .wrapper{
     width: 200px;
     height: 200px;
     margin: 100px auto;
     border:1px solid teal;
     position: relative;
     transform: rotate3d(0,1,0,45deg);
     transform-style: preserve-3d;
    }
    .wrapper>div{
      position: absolute;
      width: inherit;
      height: inherit;
      background-color: #000;
      transform: rotate3d(0,1,0,0deg);
    }
    .wrapper div:last-child{
      background-color: blue;
      transform: rotate3d(1,0,0,60deg);
    }
  </style>
</head>
<body>
  <div class="wrapper">
    <div></div>
    <div></div>
  </div>
</body>
</html>